(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[76,77,81],{20:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return r}));var o=n(38);const c=t=>!Object(o.a)(t)&&t instanceof Object&&t.constructor===Object;function r(t,e){return c(t)&&e in t}},286:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o=function(){return o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var c in e=arguments[n])Object.prototype.hasOwnProperty.call(e,c)&&(t[c]=e[c]);return t},o.apply(this,arguments)};Object.create,Object.create},287:function(t,e,n){"use strict";function o(t){return t.toLowerCase()}n.d(e,"a",(function(){return a}));var c=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],r=/[^A-Z0-9]+/gi;function a(t,e){void 0===e&&(e={});for(var n=e.splitRegexp,a=void 0===n?c:n,i=e.stripRegexp,s=void 0===i?r:i,u=e.transform,d=void 0===u?o:u,f=e.delimiter,b=void 0===f?" ":f,g=l(l(t,a,"$1\0$2"),s,"\0"),m=0,p=g.length;"\0"===g.charAt(m);)m++;for(;"\0"===g.charAt(p-1);)p--;return g.slice(m,p).split("\0").map(d).join(b)}function l(t,e,n){return e instanceof RegExp?t.replace(e,n):e.reduce((function(t,e){return t.replace(e,n)}),t)}},29:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>"string"==typeof t},290:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var o=n(286),c=n(287);function r(t,e){return void 0===e&&(e={}),function(t,e){return void 0===e&&(e={}),Object(c.a)(t,Object(o.a)({delimiter:"."},e))}(t,Object(o.a)({delimiter:"-"},e))}},291:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var o=n(4),c=n.n(o),r=n(20),a=n(29),l=n(290),i=n(132);function s(t={}){const e={};return Object(i.getCSSRules)(t,{selector:""}).forEach((t=>{e[t.key]=t.value})),e}function u(t,e){return t&&e?`has-${Object(l.a)(e)}-${t}`:""}const d=t=>{const e=(t=>{const e=Object(r.a)(t)?t:{style:{}};let n=e.style;return Object(a.a)(n)&&(n=JSON.parse(n)||{}),Object(r.a)(n)||(n={}),{...e,style:n}})(t),n=function(t){var e,n,o,a,l,i,d;const{backgroundColor:f,textColor:b,gradient:g,style:m}=t,p=u("background-color",f),h=u("color",b),v=function(t){if(t)return`has-${t}-gradient-background`}(g),y=v||(null==m||null===(e=m.color)||void 0===e?void 0:e.gradient);return{className:c()(h,v,{[p]:!y&&!!p,"has-text-color":b||(null==m||null===(n=m.color)||void 0===n?void 0:n.text),"has-background":f||(null==m||null===(o=m.color)||void 0===o?void 0:o.background)||g||(null==m||null===(a=m.color)||void 0===a?void 0:a.gradient),"has-link-color":Object(r.a)(null==m||null===(l=m.elements)||void 0===l?void 0:l.link)?null==m||null===(i=m.elements)||void 0===i||null===(d=i.link)||void 0===d?void 0:d.color:void 0}),style:s({color:(null==m?void 0:m.color)||{}})}}(e),o=function(t){var e;const n=(null===(e=t.style)||void 0===e?void 0:e.border)||{};return{className:function(t){var e;const{borderColor:n,style:o}=t,r=n?u("border-color",n):"";return c()({"has-border-color":!!n||!(null==o||null===(e=o.border)||void 0===e||!e.color),[r]:!!r})}(t),style:s({border:n})}}(e),l=function(t){var e;return{className:void 0,style:s({spacing:(null===(e=t.style)||void 0===e?void 0:e.spacing)||{}})}}(e),i=(t=>{const e=Object(r.a)(t.style.typography)?t.style.typography:{},n=Object(a.a)(e.fontFamily)?e.fontFamily:"";return{className:t.fontFamily?`has-${t.fontFamily}-font-family`:n,style:{fontSize:t.fontSize?`var(--wp--preset--font-size--${t.fontSize})`:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight,letterSpacing:e.letterSpacing,lineHeight:e.lineHeight,textDecoration:e.textDecoration,textTransform:e.textTransform}}})(e);return{className:c()(i.className,n.className,o.className,l.className),style:{...i.style,...n.style,...o.style,...l.style}}}},342:function(t,e,n){"use strict";n.r(e),n.d(e,"Block",(function(){return d}));var o=n(0),c=n(1),r=n(4),a=n.n(r),l=n(19),i=n(60),s=n(291),u=n(145);n(343);const d=t=>{const{className:e,align:n}=t,r=Object(s.a)(t),{parentClassName:u}=Object(i.useInnerBlockLayoutContext)(),{product:d}=Object(i.useProductDataContext)();if(!d.id||!d.on_sale)return null;const f="string"==typeof n?`wc-block-components-product-sale-badge--align-${n}`:"";return Object(o.createElement)("div",{className:a()("wc-block-components-product-sale-badge",e,f,{[`${u}__product-onsale`]:u},r.className),style:r.style},Object(o.createElement)(l.a,{label:Object(c.__)("Sale","woocommerce"),screenReaderLabel:Object(c.__)("Product on sale","woocommerce")}))};e.default=Object(u.withProductDataContext)(d)},343:function(t,e){},344:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));let o=function(t){return t.SINGLE="single",t.THUMBNAIL="thumbnail",t}({})},366:function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var o=n(0),c=n(1),r=n(4),a=n.n(r),l=n(2),i=n(60),s=n(291),u=n(145),d=n(73),f=n(342),b=(n(367),n(344));const g=t=>Object(o.createElement)("img",{...t,src:l.PLACEHOLDER_IMG_SRC,alt:"",width:void 0,height:void 0}),m=({image:t,loaded:e,showFullSize:n,fallbackAlt:c,width:r,scale:a,height:l})=>{const{thumbnail:i,src:s,srcset:u,sizes:d,alt:f}=t||{},b={alt:f||c,hidden:!e,src:i,...n&&{src:s,srcSet:u,sizes:d}},m={height:l,width:r,objectFit:a};return Object(o.createElement)(o.Fragment,null,b.src&&Object(o.createElement)("img",{style:m,"data-testid":"product-image",...b}),!t&&Object(o.createElement)(g,{style:m}))},p=t=>{const{className:e,imageSizing:n=b.a.SINGLE,showProductLink:r=!0,showSaleBadge:l,saleBadgeAlign:u="right",height:p,width:h,scale:v,...y}=t,O=Object(s.a)(t),{parentClassName:j}=Object(i.useInnerBlockLayoutContext)(),{product:k,isLoading:w}=Object(i.useProductDataContext)(),{dispatchStoreEvent:N}=Object(d.a)();if(!k.id)return Object(o.createElement)("div",{className:a()(e,"wc-block-components-product-image",{[`${j}__product-image`]:j},O.className)},Object(o.createElement)(g,null));const S=!!k.images.length,E=S?k.images[0]:null,x=r?"a":o.Fragment,C=Object(c.sprintf)(/* translators: %s is referring to the product name */
Object(c.__)("Link to %s","woocommerce"),k.name),L={href:k.permalink,...!S&&{"aria-label":C},onClick:()=>{N("product-view-link",{product:k})}};return Object(o.createElement)("div",{className:a()(e,"wc-block-components-product-image",{[`${j}__product-image`]:j},O.className)},Object(o.createElement)(x,{...r&&L},!!l&&Object(o.createElement)(f.default,{align:u,...y}),Object(o.createElement)(m,{fallbackAlt:k.name,image:E,loaded:!w,showFullSize:n!==b.a.THUMBNAIL,width:h,height:p,scale:v})))};e.b=Object(u.withProductDataContext)(p)},367:function(t,e){},38:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=t=>null===t},537:function(t,e,n){"use strict";n.r(e);var o=n(145),c=n(366),r={showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:n(344).a.SINGLE},productId:{type:"number",default:0},isDescendentOfQueryLoop:{type:"boolean",default:!1},isDescendentOfSingleProductBlock:{type:"boolean",default:!1},width:{type:"string"},height:{type:"string"},scale:{type:"string",default:"cover"}};e.default=Object(o.withFilteredAttributes)(r)(c.b)}}]);